package com.toivan.mt.model;

import android.content.Context;
import android.graphics.drawable.Drawable;


import androidx.annotation.NonNull;

import com.toivan.mt.R;
import com.toivan.sdk.model.MtToneFilter;

public enum MtToneFilterEnum {
    NO_FILTER(R.string.none, R.string.none, MtToneFilter.NO_TONE_FILTER, R.drawable.icon_tone_none),
    LIGHT_EXPOSURE(R.string.tone_light_exposure, R.string.tone_key_light_exposure, MtToneFilter.LIGHT_EXPOSURE_TONE_FILTER, R.drawable.icon_tone_light_exposure),
    HIGHLIGHT(R.string.tone_highlight, R.string.tone_key_highlight, MtToneFilter.HIGHLIGHT_TONE_FILTER, R.drawable.icon_tone_highlight),
    GRAY(R.string.tone_gray, R.string.tone_key_gray, MtToneFilter.GRAY_TONE_FILTER, R.drawable.icon_tone_gray),
    AMERICAN(R.string.tone_american, R.string.tone_key_american, MtToneFilter.AMERICAN_TONE_FILTER, R.drawable.icon_tone_american),
    BURLY_WOOD(R.string.tone_burly_wood, R.string.tone_key_burly_wood, MtToneFilter.BURLYWOOD_TONE_FILTER, R.drawable.icon_tone_burly_wood),
    LOW_KEY(R.string.tone_low_key, R.string.tone_key_low_key, MtToneFilter.LOW_KEY_TONE_FILTER, R.drawable.icon_tone_low_key),
    LUCENCY(R.string.tone_lucency, R.string.tone_key_lucency, MtToneFilter.LUCENCY_TONE_FILTER, R.drawable.icon_tone_lucency);


    private int stringId;
    private int filterNameId;
    private MtToneFilter toneFilter;
    private int imageId;

    MtToneFilterEnum(int stringId, int filterNameId, MtToneFilter toneFilter, int imageId) {
        this.stringId = stringId;
        this.filterNameId = filterNameId;
        this.toneFilter = toneFilter;
        this.imageId = imageId;
    }

    public String getString(@NonNull Context context) {
        return context.getResources().getString(stringId);
    }

    public String getFilterName(@NonNull Context context) {
        return context.getResources().getString(filterNameId);
    }

    public MtToneFilter getToneFilter() {
        return toneFilter;
    }

    public Drawable getImageDrawable(@NonNull Context context) {
        return context.getResources().getDrawable(imageId);
    }


}
